home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3n / t_bind.z / t_bind
Encoding:
Text File  |  2002-10-03  |  11.8 KB  |  199 lines

  1.  
  2.  
  3.  
  4. tttt____bbbbiiiinnnndddd((((3333NNNN))))                                                          tttt____bbbbiiiinnnndddd((((3333NNNN))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _tttt______bbbb_iiii_nnnn_dddd - bind an address to a transport endpoint
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_ffff_dddd_eeee_ffff ______XXXX_OOOO_PPPP_EEEE_NNNN______SSSS_OOOO_UUUU_RRRR_CCCC_EEEE
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_xxxx_tttt_iiii_...._hhhh_>>>>
  14.      _####_eeee_llll_ssss_eeee
  15.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_tttt_iiii_uuuu_ssss_eeee_rrrr_...._hhhh_>>>>
  16.      _####_eeee_nnnn_dddd_iiii_ffff
  17.  
  18.      _iiii_nnnn_tttt _tttt______bbbb_iiii_nnnn_dddd _((((_ffff_dddd_,,,, _rrrr_eeee_qqqq_,,,, _rrrr_eeee_tttt_))))
  19.      _iiii_nnnn_tttt _ffff_dddd_;;;;
  20.      _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt______bbbb_iiii_nnnn_dddd _****_rrrr_eeee_qqqq_;;;;
  21.      _ssss_tttt_rrrr_uuuu_cccc_tttt _tttt______bbbb_iiii_nnnn_dddd _****_rrrr_eeee_tttt_;;;;
  22.  
  23. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.      This function associates a protocol address with the transport endpoint
  25.      specified by _ffff_dddd and activates that transport endpoint.  In connection
  26.      mode, the transport provider may begin accepting or requesting
  27.      connections on the transport endpoint.  In connectionless mode, the
  28.      transport user may send or receive data units through the transport
  29.      endpoint.
  30.  
  31.      The _rrrr_eeee_qqqq and _rrrr_eeee_tttt arguments point to a _tttt______bbbb_iiii_nnnn_dddd structure containing the
  32.      following members:
  33.  
  34.           _ssss_tttt_rrrr_uuuu_cccc_tttt _nnnn_eeee_tttt_bbbb_uuuu_ffff _aaaa_dddd_dddd_rrrr_;;;;
  35.           _uuuu_nnnn_ssss_iiii_gggg_nnnn_eeee_dddd _qqqq_llll_eeee_nnnn_;;;;
  36.  
  37.      _nnnn_eeee_tttt_bbbb_uuuu_ffff is described in _iiii_nnnn_tttt_rrrr_oooo(3N).  The _aaaa_dddd_dddd_rrrr field of the _tttt______bbbb_iiii_nnnn_dddd structure
  38.      specifies a protocol address and the _qqqq_llll_eeee_nnnn field is used to indicate the
  39.      maximum number of outstanding connect indications.
  40.  
  41.      _rrrr_eeee_qqqq is used to request that an address, represented by the _nnnn_eeee_tttt_bbbb_uuuu_ffff
  42.      structure, be bound to the given transport endpoint.  _llll_eeee_nnnn [see _nnnn_eeee_tttt_bbbb_uuuu_ffff in
  43.      _iiii_nnnn_tttt_rrrr_oooo(3N); also for _bbbb_uuuu_ffff and _mmmm_aaaa_xxxx_llll_eeee_nnnn] specifies the number of bytes in the
  44.      address and _bbbb_uuuu_ffff points to the address buffer.  _mmmm_aaaa_xxxx_llll_eeee_nnnn has no meaning for
  45.      the _rrrr_eeee_qqqq argument.  On return, _rrrr_eeee_tttt contains the address that the transport
  46.      provider actually bound to the transport endpoint; this may be different
  47.      from the address specified by the user in _rrrr_eeee_qqqq.  In _rrrr_eeee_tttt, the user
  48.      specifies _mmmm_aaaa_xxxx_llll_eeee_nnnn, which is the maximum size of the address buffer, and
  49.      _bbbb_uuuu_ffff, which points to the buffer where the address is to be placed.  On
  50.      return, _llll_eeee_nnnn specifies the number of bytes in the bound address and _bbbb_uuuu_ffff
  51.      points to the bound address.  If _mmmm_aaaa_xxxx_llll_eeee_nnnn is not large enough to hold the
  52.      returned address, an error will result.
  53.  
  54.      If the requested address is not available, or if no address is specified
  55.      in _rrrr_eeee_qqqq (the _llll_eeee_nnnn field of _aaaa_dddd_dddd_rrrr in _rrrr_eeee_qqqq is zero) the transport provider may
  56.      assign an appropriate address to be bound, and will return that address
  57.      in the _aaaa_dddd_dddd_rrrr field of _rrrr_eeee_tttt.  The user can compare the addresses in _rrrr_eeee_qqqq and
  58.      _rrrr_eeee_tttt to determine whether the transport provider bound the transport
  59.      endpoint to a different address than that requested.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. tttt____bbbbiiiinnnndddd((((3333NNNN))))                                                          tttt____bbbbiiiinnnndddd((((3333NNNN))))
  71.  
  72.  
  73.  
  74.      _rrrr_eeee_qqqq may be _NNNN_UUUU_LLLL_LLLL if the user does not wish to specify an address to be
  75.      bound.  Here, the value of _qqqq_llll_eeee_nnnn is assumed to be zero, and the transport
  76.      provider must assign an address to the transport endpoint.  Similarly,
  77.      _rrrr_eeee_tttt may be _NNNN_UUUU_LLLL_LLLL if the user does not care what address was bound by the
  78.      provider and is not interested in the negotiated value of _qqqq_llll_eeee_nnnn.  It is
  79.      valid to set _rrrr_eeee_qqqq and _rrrr_eeee_tttt to _NNNN_UUUU_LLLL_LLLL for the same call, in which case the
  80.      provider chooses the address to bind to the transport endpoint and does
  81.      not return that information to the user.
  82.  
  83.      The _qqqq_llll_eeee_nnnn field has meaning only when initializing a connection-mode
  84.      service.  It specifies the number of outstanding connect indications the
  85.      transport provider should support for the given transport endpoint.  An
  86.      outstanding connect indication is one that has been passed to the
  87.      transport user by the transport provider.  A value of _qqqq_llll_eeee_nnnn greater than
  88.      zero is only meaningful when issued by a passive transport user that
  89.      expects other users to call it.  The value of _qqqq_llll_eeee_nnnn will be negotiated by
  90.      the transport provider and may be changed if the transport provider
  91.      cannot support the specified number of outstanding connect indications.
  92.      On return, the _qqqq_llll_eeee_nnnn field in _rrrr_eeee_tttt will contain the negotiated value.
  93.  
  94.      This function allows more than one transport endpoint to be bound to the
  95.      same protocol address (however, the transport provider must support this
  96.      capability also), but it is not allowable to bind more than one protocol
  97.      address to the same transport endpoint.  If a user binds more than one
  98.      transport endpoint to the same protocol address, only one endpoint can be
  99.      used to listen for connect indications associated with that protocol
  100.      address.  In other words, only one _tttt______bbbb_iiii_nnnn_dddd for a given protocol address
  101.      may specify a value of _qqqq_llll_eeee_nnnn greater than zero.  In this way, the
  102.      transport provider can identify which transport endpoint should be
  103.      notified of an incoming connect indication.  If a user attempts to bind a
  104.      protocol address to a second transport endpoint with a value of _qqqq_llll_eeee_nnnn
  105.      greater than zero, the transport provider will assign another address to
  106.      be bound to that endpoint.  If a user accepts a connection on the
  107.      transport endpoint that is being used as the listening endpoint, the
  108.      bound protocol address will be found to be busy for the duration of that
  109.      connection.  No other transport endpoints may be bound for listening
  110.      while that initial listening endpoint is in the data transfer phase.
  111.      This will prevent more than one transport endpoint bound to the same
  112.      protocol address from accepting connect indications.
  113.  
  114.      This function resides within both the X/Open compliant _llll_iiii_bbbb_xxxx_nnnn_eeee_tttt and the
  115.      SVR4 compliant _llll_iiii_bbbb_nnnn_ssss_llll Network Services libraries.  Network Services
  116.      applications which require X/Open compliance must link-load with _----_llll_xxxx_nnnn_eeee_tttt.
  117.      Network Services applications which require SVR4 compliance must link-
  118.      load with _----_llll_nnnn_ssss_llll.
  119.  
  120.      On failure, _tttt______eeee_rrrr_rrrr_nnnn_oooo may be set to one of the following:
  121.  
  122.      _[[[[_TTTT_BBBB_AAAA_DDDD_FFFF_]]]]            The specified file descriptor does not refer to a
  123.                         transport endpoint.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. tttt____bbbbiiiinnnndddd((((3333NNNN))))                                                          tttt____bbbbiiiinnnndddd((((3333NNNN))))
  137.  
  138.  
  139.  
  140.      _[[[[_TTTT_OOOO_UUUU_TTTT_SSSS_TTTT_AAAA_TTTT_EEEE_]]]]        The function was issued in the wrong sequence.
  141.  
  142.      _[[[[_TTTT_BBBB_AAAA_DDDD_AAAA_DDDD_DDDD_RRRR_]]]]         The specified protocol address was in an incorrect
  143.                         format or contained illegal information.
  144.  
  145.      _[[[[_TTTT_NNNN_OOOO_AAAA_DDDD_DDDD_RRRR_]]]]          The transport provider could not allocate an address.
  146.  
  147.      _[[[[_TTTT_AAAA_CCCC_CCCC_EEEE_SSSS_]]]]           The user does not have permission to use the specified
  148.                         address.
  149.  
  150.      _[[[[_TTTT_BBBB_UUUU_FFFF_OOOO_VVVV_FFFF_LLLL_WWWW_]]]]        The number of bytes allowed for an incoming argument
  151.                         is not sufficient to store the value of that argument.
  152.                         The provider's state will change to _[[[[_TTTT______IIII_DDDD_LLLL_EEEE_]]]] and the
  153.                         information to be returned in _rrrr_eeee_tttt will be discarded.
  154.  
  155.      _TTTT_SSSS_YYYY_SSSS_EEEE_RRRR_RRRR            A system error has occurred during execution of this
  156.                         function.
  157.  
  158. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  159.      _iiii_nnnn_tttt_rrrr_oooo(3N), _tttt______aaaa_llll_llll_oooo_cccc(3N), _tttt______cccc_llll_oooo_ssss_eeee(3N), _tttt______oooo_pppp_eeee_nnnn(3N), _tttt______oooo_pppp_tttt_mmmm_gggg_mmmm_tttt(3N),
  160.      _tttt______uuuu_nnnn_bbbb_iiii_nnnn_dddd(3N)
  161.  
  162. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  163.      _tttt______bbbb_iiii_nnnn_dddd returns 0 on success and -1 on failure and _tttt______eeee_rrrr_rrrr_nnnn_oooo is set to
  164.      indicate the error.
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.